home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pp / pp-6.0 / Lib / format / rfc2encinfo.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-18  |  1016 b   |  53 lines

  1. /* rfc2encinfo.c - Converts a RFC string into a EncodedIT struct */
  2.  
  3. # ifndef lint
  4. static char Rcsid[] = "@(#)$Header: /xtel/pp/pp-beta/Lib/format/RCS/rfc2encinfo.c,v 6.0 1991/12/18 20:22:06 jpo Rel $";
  5. # endif
  6.  
  7. /*
  8.  * $Header: /xtel/pp/pp-beta/Lib/format/RCS/rfc2encinfo.c,v 6.0 1991/12/18 20:22:06 jpo Rel $
  9.  *
  10.  * $Log: rfc2encinfo.c,v $
  11.  * Revision 6.0  1991/12/18  20:22:06  jpo
  12.  * Release 6.0
  13.  *
  14.  */
  15.  
  16.  
  17.  
  18. #include "util.h"
  19. #include "mta.h"
  20. #include "list_bpt.h"
  21.  
  22.  
  23.  
  24. /* ---------------------  Begin  Routines  -------------------------------- */
  25.  
  26. int rfc2encinfo (ep, str)
  27. EncodedIT    *ep;
  28. char        *str;
  29. {
  30.     LIST_BPT        *base = NULLIST_BPT,
  31.             *new;
  32.     char            *cp = str,
  33.             *bp = str;
  34.  
  35.  
  36.     PP_DBG (("Lib/rfc2listbpt (%s)", str));
  37.  
  38.     /* -- read string which delimitted by ',' and an optional ' '  -- */
  39.     while (cp != NULLCP) {
  40.         if (cp = index (bp, ',')) {
  41.             *cp++ = '\0';
  42.             if (*cp == ' ') cp++;
  43.         }
  44.         new = list_bpt_new (bp);
  45.         list_bpt_add (&base, new);
  46.         bp = cp;
  47.     }
  48.  
  49.     ep -> eit_types = base;
  50.  
  51.     return OK;
  52. }
  53.